package com.njuse.jvmfinal.Instruction;

import java.nio.ByteBuffer;

import com.njuse.jvmfinal.runtimestructure.Jframe;

public class ALOAD extends Instruction {
	   private int index;
	   	   
		public  void readindex(ByteBuffer reader) {
			this.index= (int) reader.get();
		}
		
		public  void execute(Jframe frame) {
			int top=frame.getStacktop();
			Object[] stack=frame.getManagestack();
			stack[top]=frame.getLocal()[index];
			top++;
			frame.setManagestack(stack);
			frame.setStacktop(top);
		}
}
